abstract class $DISPENSER{ETP} < $CONTAINER{ETP},$STR |
---|
**** | A dispenser is an abstraction that only permits the removal of one element at a time. This abstraction just permits the non-modifying operations and is mainly to organize the collection of classes (to ensure that they all have certain basic features like size). We do not currently believe that an abstract dispenser will show up in actual code... |
$STR | $CONTAINER{_} | $ELT{_} | $ELT |
$QUEUE{_} | A_QUEUE{_} | QUEUE{_} | $PQ{_} | A_PQ{_} | $NR_STACK{_} | NR_STACK{_} | NR_A_STACK{_} | $STACK{_} | STACK{_} | A_STACK{_} |
current: ETP; |
---|
**** | Return the current item |
elt!: ETP; |
---|
**** | Return the elements of the dispenser in some *undefined* order. Particular abstractions might define a stronger ordering relation |
remove: ETP; |
---|
**** | Return the current item and advance |
size: INT; |
---|
**** | Number of items in the dispenser |